package com.eedi.framework.permission.enums;


import com.eedi.framework.common.exception.ErrorCode;
import com.eedi.sys.enums.SysErrorCode;
import com.eedi.sys.enums.SysErrorCodeType;

/**
 * System 错误码枚举类
 *
 * system 系统，使用 1-002-000-000 段
 */
public interface SysPermissionErrorCodeConstants {


    // ========== 菜单模块 1-002-001-000 ==========
    ErrorCode SYS_MENU_NAME_DUPLICATE = new SysErrorCode(SysErrorCodeType.PERMISSION,000, "已经存在该名字的菜单");
    ErrorCode SYS_MENU_PARENT_NOT_EXISTS = new SysErrorCode(SysErrorCodeType.PERMISSION,001, "父菜单不存在");
    ErrorCode SYS_MENU_PARENT_ERROR = new SysErrorCode(SysErrorCodeType.PERMISSION,002, "不能设置自己为父菜单");
    ErrorCode SYS_MENU_NOT_EXISTS = new SysErrorCode(SysErrorCodeType.PERMISSION,003, "菜单不存在");
    ErrorCode SYS_MENU_EXISTS_CHILDREN = new SysErrorCode(SysErrorCodeType.PERMISSION,004, "存在子菜单，无法删除");
    ErrorCode SYS_MENU_PARENT_NOT_DIR_OR_MENU = new SysErrorCode(SysErrorCodeType.PERMISSION,005, "父菜单的类型必须是目录或者菜单");

    // ========== 角色模块 1-002-002-000 ==========
    ErrorCode SYS_ROLE_NOT_EXISTS = new SysErrorCode(SysErrorCodeType.PERMISSION,000, "角色不存在");
    ErrorCode SYS_ROLE_NAME_DUPLICATE = new SysErrorCode(SysErrorCodeType.PERMISSION,001, "已经存在名为【{}】的角色");
    ErrorCode SYS_ROLE_CODE_DUPLICATE = new SysErrorCode(SysErrorCodeType.PERMISSION,002, "已经存在编码为【{}】的角色");
    ErrorCode SYS_ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE = new SysErrorCode(SysErrorCodeType.PERMISSION,003, "不能操作类型为系统内置的角色");
    ErrorCode SYS_ROLE_IS_DISABLE = new SysErrorCode(SysErrorCodeType.PERMISSION,004, "名字为【{}】的角色已被禁用");
    ErrorCode SYS_ROLE_ADMIN_CODE_ERROR = new SysErrorCode(SysErrorCodeType.PERMISSION,005, "编码【{}】不能使用");

    // ========== 角色模块 1-002-002-000 ==========
    ErrorCode SYS_PERMISSION_USER_INFO_NOT_EXISTS = new SysErrorCode(SysErrorCodeType.PERMISSION,000, "用户登录信息不存在");

}
